package cn.itcast.connectors;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.flink.api.common.RuntimeExecutionMode;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author KTL
 * @version V1.0
 * @Package cn.itcast.connectors
 * @date 2021/2/24 0024 17:37
 * @Copyright © 2015-04-29  One for each, and two for each
 */
public class JDBCDemo {
    public static void main(String[] args) throws Exception {
         StreamExecutionEnvironment environment = StreamExecutionEnvironment.getExecutionEnvironment();
         environment.setRuntimeMode(RuntimeExecutionMode.AUTOMATIC);

        final DataStreamSource<Student> studentDS = environment.fromElements(new Student(null, "tomy", 18));

        environment.execute();

    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Student{
        private String id ;
        private String name ;
        private int age;
    }
}
